<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/MANU_SEMIFINISHED_PRODUCT_FEEDING.js此处编写
 -->
<template>
    <!-- <div>
    <button @click="fetchData">Fetch Data</button>
    <div v-if="data">Fetched Data: {{ data }}</div>
  </div> -->
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
import axios from 'axios';
    import extend from "@/extension/system/workbusiness/MANU_SEMIFINISHED_PRODUCT_FEEDING.js";
    import { ref, defineComponent } from "vue";
import { dataType } from 'element-plus/es/components/table-v2/src/common.mjs';
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '上料',
                name: 'workbusiness/MANU_SEMIFINISHED_PRODUCT_FEEDING',
                url: "/MANU_SEMIFINISHED_PRODUCT_FEEDING/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"Equipment_Id":"","FeedingQty":""});
            const editFormOptions = ref([[{"dataKey":"设备","data":[],"title":"设备","field":"Equipment_Id","type":"select"},
                               {"title":"上料数量","field":"FeedingQty","type":"decimal"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Id',title:'id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'SFC',title:'上料条码',type:'string',width:110,align:'left',sort:true},
                       {field:'Order_Id',title:'工单',type:'string',width:110,align:'left'},
                       {field:'OperationId',title:'工序',type:'string',width:110,align:'left'},
                       {field:'Equipment_Id',title:'设备',type:'string',bind:{ key:'设备',data:[]},width:110,align:'left'},
                       {field:'FeedingQty',title:'上料数量',type:'decimal',width:110,align:'left'},
                       {field:'FeedingPointId',title:'上料点',type:'string',width:110,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
        methods: {
            fetchData() {
             
               
                // axios.get('http://192.168.110.183:8075/webroot/decision/login/cross/domain?fine_username=admin&fine_password=123456&validity=-1')
                // .then(response => {
                //     debugger;
                // this.data = response.data;
                // })
                // .catch(error => {
                // console.error('There was an error!', error);
                // });
        
                   //或者使用使用this.ajax做同步请求
                  
 
              
                //    window.open("https://www.baidu.com/");
                // window.open("http://192.168.110.183:8075/webroot/decision/data/portal/9273c4d4-b9bd-41f6-8a24-da008c6b58ea/view");
             //   window.open("http://192.168.28.181/report.htm");
            }
        }
    });
</script>
